package com.yc.cloud.admin.service;

import com.yc.cloud.admin.dto.request.AnswerCreateParam;
import com.yc.cloud.admin.dto.request.AnswerListParam;
import com.yc.cloud.admin.vo.AnswerVo;
import com.yc.cloud.entity.Answer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yc.cloud.basic.dto.BaseQueryParam;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * <p>
 * 答题库 服务类
 * </p>
 *
 * @author Yancy
 * @since 2024-01-31
 */
public interface AnswerService extends IService<Answer> {

    /***
     * description:查询列表
     *
     * @param answerListParam
     * @param param 查询条件
     * @return 数据信息
     */
    IPage<AnswerVo> list(AnswerListParam answerListParam, BaseQueryParam param);

    <T> AnswerVo convertVo(T answer);

    List<AnswerVo> convertVo(List<Answer> answerList);

    Answer create(AnswerCreateParam param);

    Answer get(Long id);

    Answer update(Long id, Answer answer);

    boolean delete(Long id);

    boolean deleteByQuestionNo(String questionNo);
}



